package com.kaka.TheSingletonPattern;

public class User2 {
    //饿汉式
    private static User2 user2 = new User2();

    private User2() {
    }

    public static User2 getInstance() {
        return user2;
    }
}
